package com.zxq.uart;

import com.zxq.uart.controller._01PowerStateController;
import com.zxq.uart.controller._0BStopChargeController;
import com.zxq.uart.mqtt.ChargeMqttClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication
@EnableFeignClients
public class ShiLuWenGanApplication implements CommandLineRunner {


    public static void main(String[] args) {
        SpringApplication.run(ShiLuWenGanApplication.class, args);
    }


    @Autowired
    _01PowerStateController powerStateController;

     @Autowired
    _0BStopChargeController stopChargeController;

    @Autowired
    ChargeMqttClient chargeMqttClient;



    @Override
    public void run(String... args) throws Exception {

//        _01ReadPortCmd readPort = new _01ReadPortCmd();
//        readPort.setCode(0);
//        _01PortStateResult result = powerStateController.exchange(readPort);
//        System.out.println(result.toString());
//
//        _0BStopChargeCmd _0BStopChargeCmd = new _0BStopChargeCmd();
//        _0BStopChargeCmd.setPort(10);
//        _0BStopChargeResult bStopChargeResult = stopChargeController.exchange(_0BStopChargeCmd);
//         System.out.println(bStopChargeResult);

    }


}
